<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>筛选结果</title>
    <link rel="stylesheet" href="css/home.css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
    <div class="header">
        <!-- 复用原有的header -->
    </div>

    <div class="main-container">
        <div class="content-area">
            <div class="filter-header">
                <h2 id="filterTitle">筛选结果</h2>
            </div>
            <div class="product-list" id="productList">
                <!-- 商品列表将通过JavaScript动态生成 -->
            </div>
        </div>
    </div>

    <script>
        $(document).ready(function() {
            // 获取URL参数
            const urlParams = new URLSearchParams(window.location.search);
            const category = urlParams.get('category');
            const subCategory = urlParams.get('subCategory');

            // 更新页面标题
            document.title = `${subCategory || category} - 筛选结果`;
            $('#filterTitle').text(`${subCategory || category}`);

            // 加载筛选结果
            filterProducts(category, subCategory);
        });

        // 复用原有的filterProducts和displayProducts函数
    </script>
</body>
</html> 